#!/usr/bin/python
#
# Copyright (C) 2008 rambla.be
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

try:
  from xml.etree import cElementTree as ElementTree
except ImportError:
  try:
    import cElementTree as ElementTree
  except ImportError:
    from elementtree import ElementTree

import atom
import rawsc
from rawsc import RAWS_NAMESPACE

class Name(rawsc.RawsBaseElement):
    """The RASS name element"""
    _tag = 'name'

def NameFromString(xml_string):
    return atom.CreateClassFromXMLString(Name, xml_string)


class Size(rawsc.RawsBaseElement):
    """The RASS size element"""
    _tag = 'size'

def SizeFromString(xml_string):
    return atom.CreateClassFromXMLString(Size, xml_string)


class Updated(rawsc.RawsBaseElement):
    """The RASS updated element"""
    _tag = 'updated'

def UpdatedFromString(xml_string):
    return atom.CreateClassFromXMLString(Updated, xml_string)


class Mimetype(rawsc.RawsBaseElement):
    """The RASS mimetype element"""
    _tag = 'mimetype'

def MimetypeFromString(xml_string):
    return atom.CreateClassFromXMLString(Mimetype, xml_string)



class Username(rawsc.RawsBaseElement):
    _tag = 'username'

def MethodFromString(xml_string):
    return atom.CreateClassFromXMLString(Username, xml_string)


class FirstName(rawsc.RawsBaseElement):
    _tag = 'first_name'

def MethodFromString(xml_string):
    return atom.CreateClassFromXMLString(FirstName, xml_string)


class LastName(rawsc.RawsBaseElement):
    _tag = 'last_name'

def MethodFromString(xml_string):
    return atom.CreateClassFromXMLString(LastName, xml_string)


class Email(rawsc.RawsBaseElement):
    _tag = 'email'

def MethodFromString(xml_string):
    return atom.CreateClassFromXMLString(Email, xml_string)


class Password(rawsc.RawsBaseElement):
    _tag = 'password'

def MethodFromString(xml_string):
    return atom.CreateClassFromXMLString(Password, xml_string)
